package cn.bugio.note.feignclient;

import cn.bugio.note.common.domain.dto.UserDTO;
import cn.bugio.note.common.vo.ServerResponse;
import cn.bugio.note.feignclient.fallbackfactory.UserCenterFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @author Vincent Vic
 * @version 1.0
 * @Description
 * @since 2021/2/24
 */

//日志级别
//@FeignClient(name = "user-center",configuration = UserCenterFeignConfiguration.class)
//
@FeignClient(name = "user-center"
        //,fallback = UserCenterFeignClientFallback.class
        ,fallbackFactory = UserCenterFeignClientFallbackFactory.class
)
public interface UserCenterFeignClient {

    @GetMapping("/users/{id}")
    ServerResponse<UserDTO> findById(@PathVariable("id") Integer id);
}
